package com.tengyun.middleplatform.trade.tradedata.service.impl;

import com.alibaba.fastjson.JSON;
import com.tengyun.middleplatform.trade.tradedata.service.ICustomerService;
import com.tengyun.middleplatform.trade.tradedata.util.AikeHttpUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * @Author: likailun
 * @Description:
 * @Date: create in 2022/8/26 6:11 PM
 */
@Slf4j
@Service
public class CustomerServiceImpl implements ICustomerService {

    @Resource
    private AikeHttpUtil aikeHttpUtil;

    @Override
    public void queryCustomerList(int pageIndex, int pageSize, int cursor) {
        final Map<String, Object> params = new HashMap<>();
        params.put("page_index",pageIndex);
        params.put("page_size",pageSize);
        params.put("cursor",cursor);
        final AikeHttpUtil.AikeResponse aikeResponse = aikeHttpUtil.postJson("/EntWechat/Client/GetRelationList", params);
        log.info(JSON.toJSONString(aikeResponse));

    }
}
